package com.feicheng.common.task;

import com.feicheng.service.a.FJlService;
import com.feicheng.service.a.FKcService;
import com.feicheng.service.a.FXyService;
import com.feicheng.service.a.FYyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

@Component
public class BackOrderCofTask {

    @Autowired
    Cache cache;

    @Autowired
    FYyService yyService;

    @Autowired
    FKcService kcService;

    @Autowired
    FXyService xyService;

    @Autowired
    FJlService jlService;

    @Scheduled(cron = "0 0 0 * * ?") // cron 表达式：秒 分 时 日 月 周
    public void runDailyTask() {

        yyService.kaishiYyjl();
        yyService.hxYyjlitem();
        yyService.wanchengYyjl();
        yyService.jiesuanYyjl();

        xyService.wcHy();

        jlService.jiesuanBm();
        jlService.jiesuanHy();
    }

    @Scheduled(cron = "0 0/15 * * * ?") // cron 表达式：秒 分 时 日 月 周
    public void runHourlyTask() {

        kcService.kaishiKc();
        kcService.jiesuKc();
    }


}
